package com.ford.trade.service.impl;

import com.ford.trade.entity.AoKeOdds;
import com.ford.trade.repository.OddsRepository;
import com.ford.trade.service.OddsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: ford
 * @date: 2022/4/25 12:03
 */
@Service
public class OddsServiceImpl implements OddsService {
    @Resource
    private OddsRepository oddsRepository;

    @Override
    public void save(AoKeOdds aoKeOdds) {
        oddsRepository.save(aoKeOdds);
    }

    @Override
    public List<AoKeOdds> findByIndexId(Long indexId) {

        return oddsRepository.findAllByIndexId(indexId);
    }
}
